home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 24 / Amiga Format AFCD24 (Feb 1998, Issue 108).iso / -in_the_mag- / emulation / uae / uae-0.4.3 / makefile < prev    next >
Makefile  |  1998-01-20  |  8KB  |  304 lines

  1. # Makefile for UAE (Un*x Amiga Emulator)
  2. #
  3. # Copyright 1995,1996 Bernd Schmidt
  4. # Copyright 1996 Ed Hanway
  5.  
  6. .SUFFIXES: .o .c .h
  7.  
  8. # If you have a Pentium, you can get better code if you use the commented
  9. # line.
  10. # Only gcc 2.7.x understands this. Use an empty "PENTIUMOPT =" line
  11. # if you use gcc 2.6.x, or a non-x86 architecture.
  12. # PENTIUMOPT = -malign-jumps=0 -malign-loops=0
  13. PENTIUMOPT =
  14.  
  15. # If you want to use the AF System to play sound, set theese to the
  16. # correct paths. If not, leave them commented out.
  17. # (Don't forget to define AF_SOUND in config.h)
  18. #AFINCLUDE=-I/usr/local/vol/AudioFile/include
  19. #AFLDFLAGS=-L/usr/local/vol/AudioFile/lib -lAF
  20.  
  21. # Don't change anything below this line, except maybe the search paths
  22. # for X11 (X11R6 could be X11R5 on your system)
  23.  
  24. INCLUDES=-Iinclude
  25.  
  26. OBJS = main.o newcpu.o memory.o debug.o custom.o cia.o disk.o $(GFXOBJS) \
  27.        autoconf.o os.o ersatz.o filesys.o hardfile.o keybuf.o expansion.o \
  28.        readcpu.o cpudefs.o \
  29.        cpu0.o cpu1.o cpu2.o cpu3.o cpu4.o cpu5.o cpu6.o cpu7.o \
  30.        cpu8.o cpu9.o cpuA.o cpuB.o cpuC.o cpuD.o cpuE.o cpuF.o cpustbl.o
  31.        
  32. all:
  33.     @echo "Use one of the following:"
  34.     @echo "make generic -- if nothing else works"
  35.     @echo "make withgcc -- if nothing else works, but you have gcc"
  36.     @echo "make solaris -- Sun Solaris with GCC"
  37.     @echo "make sgi -- SGI IRIX 5.3"
  38.     @echo "make linux -- Linux (X Window System)"
  39.     @echo "make svga -- Linux svgalib"
  40.     @echo "make hpux -- Try to use HP-SUX compiler. Use GCC if it's available."
  41.     @echo "make hpux-gcc -- HPUX with GCC\n");
  42.     @echo "make osf -- DEC ALPHA with OSF/1"
  43.     @echo "make netbsd -- NetBSD ports"
  44.  
  45. generic:
  46.     $(MAKE) INCDIRS='-I/usr/include/X11' \
  47.         GFXLDFLAGS='-L/usr/X11/lib -lX11 -lXext' \
  48.         GFXOBJS=xwin.o \
  49.         progs
  50.  
  51. withgcc:
  52.     $(MAKE) CC='gcc' \
  53.             INCDIRS='-I/usr/include/X11' \
  54.         GFXLDFLAGS='-L/usr/X11/lib -lX11 -lXext' \
  55.         GFXOBJS=xwin.o \
  56.         progs
  57.  
  58. netbsd:
  59.     $(MAKE) CC='gcc' \
  60.         INCDIRS='-I/usr/X11/include' \
  61.         GFXLDFLAGS='-L/usr/X11/lib -lX11 -lXext' \
  62.         GFXOBJS="xwin.o nogui.o" CFLAGS=-O3 \
  63.         progs
  64.  
  65. solaris:
  66.     $(MAKE) CC='gcc' \
  67.             INCDIRS='-I/usr/openwin/include' \
  68.         GFXLDFLAGS='-L/usr/openwin/lib -lX11 -lXext' \
  69.         GFXOBJS="xwin.o nogui.o" CFLAGS=-DHAVE_STATFS_H \
  70.         progs
  71.  
  72. osf:
  73.     $(MAKE) CC=gcc \
  74.         INCDIRS='-I/usr/X11R6/include $(AFINCLUDE)' \
  75.         GFXLDFLAGS='-L/usr/X11R6/lib -lX11' \
  76.         GFXOBJS="xwin.o nogui.o" \
  77.         CFLAGS='-ansi -pedantic \
  78.         -Wall -O3 -DHAVE_MOUNT_H' \
  79.         progs
  80.  
  81. hpux:
  82.     $(MAKE) CC=cc \
  83.         INCDIRS='-I/usr/X11R5/include' \
  84.         GFXLDFLAGS='-L/usr/X11R5/lib -lX11 -lXext' \
  85.         GFXOBJS="xwin.o nogui.o" \
  86.         CFLAGS='-Aa +O1 -D_HPUX_SOURCE -D_POSIX_SOURCE -D_XOPEN_SOURCE \
  87.         -D_HAVE_VFS_H' \
  88.         progs
  89.  
  90. hpux-gcc:
  91.     $(MAKE) CC=gcc \
  92.         INCDIRS='-I/usr/X11R5/include' \
  93.         GFXLDFLAGS='-L/usr/X11R5/lib -lX11 -lXext' \
  94.         GFXOBJS="xwin.o nogui.o" \
  95.         CFLAGS='-O2 -D_HPUX_SOURCE -D_POSIX_SOURCE -D_XOPEN_SOURCE \
  96.         -D_HAVE_VFS_H' \
  97.         progs
  98.  
  99. sgi:
  100.     $(MAKE) CC=$(CXX) \
  101.         INCDIRS='-I/usr/include/X11 $(AFINCLUDE)' \
  102.         GFXLDFLAGS='-lX11 -lXext' \
  103.         GFXOBJS="xwin.o nogui.o" \
  104.         CFLAGS='-woff 3262 -O2 -DHAVE_STATFS_H -DHAVE_STRINGS_H -DHAVE_VFS_H' \
  105.         progs
  106.  
  107. linux:
  108.     $(MAKE) INCDIRS='-I/usr/X11R6/include' \
  109.         GFXLDFLAGS='-L/usr/X11R6/lib -lX11 -lXext' \
  110.         GFXOBJS="xwin.o nogui.o" \
  111.         CFLAGS='-ansi -pedantic \
  112.         -Wall -Wno-unused -Wno-format -W -Wmissing-prototypes \
  113.         -Wstrict-prototypes -O3 -fomit-frame-pointer -fstrength-reduce\
  114.         $(PENTIUMOPT) -DHAVE_VFS_H' \
  115.         progs
  116.         
  117. linux-gui:
  118.     $(MAKE) INCDIRS='-I/usr/X11R6/include' \
  119.         GFXLDFLAGS='-L/usr/X11R6/lib -lX11 -lXext' \
  120.         GFXOBJS="xwin.o xui.o" \
  121.         CFLAGS='-ansi -pedantic \
  122.         -Wall -Wno-unused -Wno-format -W -Wmissing-prototypes \
  123.         -Wstrict-prototypes -O3 -fomit-frame-pointer -fstrength-reduce\
  124.         $(PENTIUMOPT) -DHAVE_VFS_H' \
  125.         progs
  126.         
  127. linux-debug:
  128.     $(MAKE) INCDIRS='-I/usr/X11R6/include' \
  129.         GFXLDFLAGS='-L/usr/X11R6/lib -lX11 -lXext' \
  130.         GFXOBJS="xwin.o xui.o" \
  131.         CFLAGS='-ansi -pedantic \
  132.         -Wall -Wno-unused -Wno-format -W -Wmissing-prototypes \
  133.         -Wstrict-prototypes -g $(PENTIUMOPT) -DHAVE_VFS_H' \
  134.         progs
  135.         
  136. linux-prof:
  137.     $(MAKE) INCDIRS='-I/usr/X11R6/include' \
  138.         GFXLDFLAGS='-L/usr/X11R6/lib -lX11 -lXext' \
  139.         LDFLAGS=-pg \
  140.         GFXOBJS="xwin.o nogui.o" \
  141.         CFLAGS='-ansi -pedantic -DUSE_PROFILING \
  142.         -Wall -Wno-unused -Wno-format -W -Wmissing-prototypes \
  143.         -Wstrict-prototypes -g -pg $(PENTIUMOPT) -DHAVE_VFS_H' \
  144.         progs
  145.  
  146. svga:
  147.     $(MAKE) \
  148.         GFXLDFLAGS='-lvga' \
  149.         GFXOBJS="svga.o nogui.o" \
  150.         CFLAGS='-ansi -pedantic \
  151.         -Wall -Wno-unused -Wno-format -W -Wmissing-prototypes \
  152.         -Wstrict-prototypes -O3 -fomit-frame-pointer -fstrength-reduce\
  153.         $(PENTIUMOPT) -DHAVE_VFS_H' \
  154.         progs
  155.  
  156. progs: uae readdisk
  157.  
  158. install:
  159.  
  160. readdisk: readdisk.o
  161.     $(CC) readdisk.o -o readdisk $(LDFLAGS) $(DEBUGFLAGS)
  162.  
  163. uae: $(OBJS)
  164.     $(CC) $(OBJS) -o uae $(GFXLDFLAGS) $(AFLDFLAGS) $(LDFLAGS) $(DEBUGFLAGS)
  165.  
  166. clean:
  167.     -rm -f *.o uae readdisk
  168.     -rm -f gencpu genblitter build68k cpudefs.c
  169.     -rm -f cpu?.c blit.h
  170.     -rm -f cputbl.h cpustbl.c
  171.  
  172. blit.h: genblitter
  173.     ./genblitter >blit.h
  174.  
  175. genblitter: genblitter.o
  176.     $(CC) $(LDFLAGS) -o $@ $?
  177. build68k: build68k.o
  178.     $(CC) $(LDFLAGS) -o $@ $?
  179. gencpu: gencpu.o readcpu.o cpudefs.o
  180.     $(CC) $(LDFLAGS) -o $@ gencpu.o readcpu.o cpudefs.o
  181.  
  182. custom.o: blit.h
  183.  
  184. cpudefs.c: build68k table68k
  185.     ./build68k >cpudefs.c
  186. cpustbl.c: gencpu
  187.     ./gencpu s >cpustbl.c
  188. cputbl.c: gencpu
  189.     ./gencpu t >cputbl.c
  190. cputbl.h: gencpu
  191.     ./gencpu h >cputbl.h
  192.  
  193. cpu0.c: gencpu
  194.     ./gencpu f 0 >cpu0.c
  195. cpu1.c: gencpu
  196.     ./gencpu f 1 >cpu1.c
  197. cpu2.c: gencpu
  198.     ./gencpu f 2 >cpu2.c
  199. cpu3.c: gencpu
  200.     ./gencpu f 3 >cpu3.c
  201. cpu4.c: gencpu
  202.     ./gencpu f 4 >cpu4.c
  203. cpu5.c: gencpu
  204.     ./gencpu f 5 >cpu5.c
  205. cpu6.c: gencpu
  206.     ./gencpu f 6 >cpu6.c
  207. cpu7.c: gencpu
  208.     ./gencpu f 7 >cpu7.c
  209. cpu8.c: gencpu
  210.     ./gencpu f 8 >cpu8.c
  211. cpu9.c: gencpu
  212.     ./gencpu f 9 >cpu9.c
  213. cpuA.c: gencpu
  214.     ./gencpu f 10 >cpuA.c
  215. cpuB.c: gencpu
  216.     ./gencpu f 11 >cpuB.c
  217. cpuC.c: gencpu
  218.     ./gencpu f 12 >cpuC.c
  219. cpuD.c: gencpu
  220.     ./gencpu f 13 >cpuD.c
  221. cpuE.c: gencpu
  222.     ./gencpu f 14 >cpuE.c
  223. cpuF.c: gencpu
  224.     ./gencpu f 15 >cpuF.c
  225.  
  226. # Compiling these without debugging info speeds up the compilation
  227. # if you have limited RAM (<= 8M)
  228. cpu0.o: cpu0.c
  229.     $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $*.c
  230. cpu1.o: cpu1.c
  231.     $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $*.c
  232. cpu2.o: cpu2.c
  233.     $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $*.c
  234. cpu3.o: cpu3.c
  235.     $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $*.c
  236. cpu4.o: cpu4.c
  237.     $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $*.c
  238. cpu5.o: cpu5.c
  239.     $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $*.c
  240. cpu6.o: cpu6.c
  241.     $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $*.c
  242. cpu7.o: cpu7.c
  243.     $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $*.c
  244. cpu8.o: cpu8.c
  245.     $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $*.c
  246. cpu9.o: cpu9.c
  247.     $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $*.c
  248. cpuA.o: cpuA.c
  249.     $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $*.c
  250. cpuB.o: cpuB.c
  251.     $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $*.c
  252. cpuC.o: cpuC.c
  253.     $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $*.c
  254. cpuD.o: cpuD.c
  255.     $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $*.c
  256. cpuE.o: cpuE.c
  257.     $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $*.c
  258. cpuF.o: cpuF.c
  259.     $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $*.c
  260.        
  261. .c.o:
  262.     $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $(DEBUGFLAGS) $*.c
  263. .c.s:
  264.     $(CC) $(INCLUDES) -S $(INCDIRS) $(CFLAGS) $*.c
  265.  
  266. # Some more dependencies...
  267. cpu0.o: cputbl.h
  268. cpu1.o: cputbl.h
  269. cpu2.o: cputbl.h
  270. cpu3.o: cputbl.h
  271. cpu4.o: cputbl.h
  272. cpu5.o: cputbl.h
  273. cpu6.o: cputbl.h
  274. cpu7.o: cputbl.h
  275. cpu8.o: cputbl.h
  276. cpu9.o: cputbl.h
  277. cpuA.o: cputbl.h
  278. cpuB.o: cputbl.h
  279. cpuC.o: cputbl.h
  280. cpuD.o: cputbl.h
  281. cpuE.o: cputbl.h
  282. cpuF.o: cputbl.h
  283. cpustbl.o: cputbl.h
  284. cputbl.o: cputbl.h
  285.  
  286. build68k.o: include/readcpu.h
  287. readcpu.o: include/readcpu.h
  288.  
  289. main.o: config.h
  290. cia.o: config.h
  291. custom.o: config.h
  292. newcpu.o: config.h
  293. autoconf.o: config.h
  294. expansion.o: config.h
  295. xwin.o: config.h
  296. svga.o: config.h
  297. os.o: config.h
  298. memory.o: config.h
  299. gencpu.o: config.h
  300. genblitter.o: config.h
  301. debug.o: config.h
  302. ersatz.o: config.h
  303. disk.o: config.h
  304.